﻿#region using...
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
#endregion

namespace Infusion.Silverlight.Controls.Ribbon
{
    #region : RibbonMainMenu :
    #region Template Parts...
    [TemplatePart(Name = RibbonMainMenu.RibbonMainMenuLayoutRoot, Type = typeof(Canvas))]
    #endregion
    public class RibbonMainMenu : Control
    {
        #region TemplatePart Names...
        public const string RibbonMainMenuLayoutRoot = "RibbonMainMenuLayoutRoot";
        #endregion

        #region TemplatePart Variables...
        private Canvas ribbonMainMenuLayoutRoot;
        #endregion

        #region Class Variables...
        private bool templateApplied = false;
        #endregion

        #region Constructor(s)...
        #region RibbonMainMenu
        public RibbonMainMenu()
        {
            DefaultStyleKey = typeof(RibbonMainMenu);
        }
        #endregion
        #endregion

        #region Methods...
        #region OnApplyTemplate
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            if (!templateApplied)
            {
                ribbonMainMenuLayoutRoot = (Canvas)GetTemplateChild(RibbonMainMenuLayoutRoot);

                templateApplied = true;
            }
        }
        #endregion
        #endregion
    }
    #endregion
}